<?php

namespace app\common\result;

class Result
{
    //success
    static public function Success($data)
    {
        $rs = [
            'code' => 200,
            'msg' => "success",
            'data' => $data,
        ];
        return json($rs);
    }

    //error
    static public function Error($code, $msg)
    {
        $rs = [
            'code' => $code,
            'msg' => $msg,
            'data' => "",
        ];
        return json($rs);
    }
}
